package com.jwthhealth_pub.old.report.view.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.jwthhealth_pub.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

public class TransitionFragment extends Fragment {

    @BindView(R.id.transition)
    TextView transition;
    Unbinder unbinder;

    private String transitionMsg = "正在加载";

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_transition, container, false);
        unbinder = ButterKnife.bind(this, view);
        showTransitionMsg("正在加载");
        return view;
    }


    public void showTransitionMsg(String msg) {
        transitionMsg = msg;
        if (transition != null) {
            transition.setText(msg);
        }
    }

    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
}
